const wear=require('../models/wear');

var wearModel=wear.model;

async function findByKind(kind) {
    //查询一个类型的衣服
    console.log(kind);
    var data=await wearModel.find({kind:kind});
    console.log(data);
    return data;
    };


async function findByKind1(kind) {
    //查询一个类型的衣服
    console.log(kind);
    var data=await wearModel.find({kind:kind}).limit(5);
    console.log(data);
    return data;
};

exports.findByKind=findByKind;
exports.findByKind1=findByKind1;
